import {
  SingleTileImageryProvider
} from '@cesiumjs';

// SingleTileImageryProvider只支持经纬度，全球范围覆盖的话顾图片的宽高比保持为2:1，若设置了rectangle，
// 可按照rectangle来设置图片的宽高比，避免图片拉伸，影响显示效果
// 作者：ayiyayiyo
// 链接：https://www.jianshu.com/p/2790dc73fabf

const tUrl = '//www.zzgis.com/cdn/3d/Assets/Images/darkmask.png'

export default {
  darkMask() {
    const url = tUrl
    return {
      name: "darkMask",
      title: "黑色蒙版",
      create: () => new SingleTileImageryProvider({
        url
      })
    }
  },
  whiteMask() {
    const url = tUrl
    return {
      name: "whiteMask",
      title: "白色蒙版",
      create: () => new SingleTileImageryProvider({
        url: '//www.zzgis.com/cdn/3d/Assets/Images/whitemask.png'
      })
    }
  }
}
